The end caps are often arranged at both ends of a generally used tubular light-emitting device for connection with the power supply. In order to improve the safety of the light-emitting device, the end caps usually will be designed with the two-step safety operation function. After the lamp tube installed with the end caps is manually connected to an adapter with a power supply and is secured, the end caps need to be further operated manually so as to switch on the electrical connection between the power supply and the lamp tube. The end cap used for a light emitting device in the prior art often uses, for instance, an electric, magnetic, or thermal switching means so as to switching on and off the electrical connection between the power supply and the lamp tube. In one of the prior art, for example, a mechanical switching means is used, which switching means can switch on or off the electrical connection between the power supply and the lamp tube when the end cap is rotated relative to the lamp tube. The above end caps put forward in the prior art usually need additional manual operation, after the end caps are completely installed and secured to the adapter, so as to turn on or off the light source connected to the end cap.